﻿using System.IO;

namespace Framework.Network
{

    public interface INetworkChannelHelper
    {
        /// <summary>
        /// 包头长度
        /// </summary>
        public long HeaderLength { get; }

        public void SerializePacket(Stream destination,byte[] info)
        {
            destination.Write(info);
        }
        /// <summary>
        /// 获得包长度
        /// </summary>
        /// <param name="header"></param>
        /// <returns></returns>
        public int DeserializePacketHeader(Stream destination);
        /// <summary>
        /// 解析包
        /// </summary>
        /// <param name="package"></param>
        public byte[] DeserializePacket(Stream destination);
        
        
        
        // public void Connect(string serverIp, int serverPort);
        void Init();
    }

}